package org.budo.dubbo.protocol.http.exception.remoting;

import java.lang.reflect.Method;

import org.budo.dubbo.protocol.http.authentication.AuthenticationCheckService.Fail;

import lombok.Getter;
import lombok.Setter;

/**
 * @author lmw
 */
@Getter
@Setter
public class AuthenticationCheckException extends RemotingRuntimeException {
    private static final long serialVersionUID = 7713533245778907489L;

    private Method method;

    private Fail fail;

    public AuthenticationCheckException() {}

    public AuthenticationCheckException(Method method, Fail fail) {
        this.setMethod(method);
        this.setFail(fail);
    }

    public String getMessage() {
        return "authenticationCheck failed, method=" + method //
                + ", fail=" + fail;
    }
}